import { ILoadMapTypeAll } from '@/common';
import { RegularExpression } from '@/common/constVariable';
import { useDescriptionsType } from '@/components/DescriptionsType';
import MyIcon from '@/components/MyIcon';
import { UploadFormCommon } from '@/components/UploadForm';
import { downloadTemplate, getFileNameNotType, getTenantID, removeDateHmsStr, splitFileUrl } from '@/utils';
import { DatePicker, Form, Input, InputNumber, Select, Tooltip, message } from 'antd';
import { useEffect } from 'react';

const getHouseUpdateConfig = ({ pageType, record, assetHouseForm, loadMapInfo, mapLoading, changeAssetType }) => {
  useEffect(() => {
    /** 回填表单 */
    if (pageType === 'detail' || pageType === 'edit') {
      assetHouseForm?.setFieldsValue({
        ...record,
      });
    }
  }, [record]);

  /** 表单配置 */
  const [houseConfig, houseMethods] = useDescriptionsType({
    labelWidth: 190,
    basicForm: assetHouseForm,
    name: 'accept-assetHouseForm',
    schemas: [
      {
        key: 'accept-header',
        title: '',
        fieldChildren: [
          {
            field: `ledgerAccount`,
            label: `单位会计科目`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Form.Item name="ledgerAccount">
                  <Select
                    loading={mapLoading}
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.LEDGER_ACCOUNT}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `assetType`,
            label: `资产分类`,
            component: 'Render',
            placeholder: '请选择',
            disabled: pageType == 'detail' || pageType == 'edit',
            required: true,
            render: (text) => {
              return (
                <Form.Item name="assetType">
                  <Select
                    loading={mapLoading}
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.ASSET_TYPE}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                    onChange={(value: string | number) => {
                      changeAssetType(value);
                    }}
                  />
                </Form.Item>
              );
            },
          },
        ],
      },
      {
        key: 'accept-basic',
        title: '基本信息',
        fieldChildren: [
          {
            field: `assetCode`,
            label: `资产编号`,
            component: 'Input',
            disabled: pageType === 'detail',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `assetName`,
            label: `资产名称`,
            component: 'Input',
            disabled: pageType === 'detail',
            placeholder: '请选择',
            required: true,
          },
          {
            field: `quantityOrArea`,
            label: `数量/面积`,
            required: true,
            component: 'InputNumber',
            disabled: pageType === 'detail',
            placeholder: '请输入',
            min: 0,
            pattern: RegularExpression?.twoFloatNumber,
            patternMsg: '请输入整数或保留两位小数',
          },
          {
            field: `jno`,
            label: `项目代码`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `unitOfMeasurement`,
            label: `计量单位`,
            disabled: pageType === 'detail',
            component: 'Render',
            required: true,
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.MATERIAL_MIDI}`]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `procureOrgType`,
            label: `采购组织形式`,
            disabled: pageType === 'detail',
            component: 'Render',
            required: true,
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Select
                    loading={mapLoading}
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.ASSET_PURCHASE_TYPE}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                );
              }
            },
          },
          {
            field: `obtainType`,
            label: `取得方式`,
            disabled: pageType === 'detail',
            component: 'Render',
            required: true,
            render: (text) => {
              return (
                <Form.Item name={'obtainType'}>
                  <Select
                    loading={mapLoading}
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.ASSET_ACQUIRE_TYPE}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `obtainDate`,
            label: `取得日期`,
            component: 'DatePicker',
            disabled: pageType === 'detail',
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            required: true,
          },
          {
            field: `usedType`,
            label: `资产用途`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          // /
          {
            field: `approvedBy`,
            label: `配置批准单位`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `inventoryNumber`,
            label: `清查编号`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={[]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
        ],
      },
      /** 财务信息 */
      {
        key: 'accept-info',
        title: '财务信息',
        fieldChildren: [
          {
            field: `valueType`,
            label: `价值类型`,
            disabled: pageType === 'detail',
            component: 'Render',
            required: true,
            render: (text) => {
              return (
                <Form.Item name="valueType">
                  <Select
                    loading={mapLoading}
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.ASSET_VALUE_TYPE}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `fiscalAppropriation`,
            label: `财政拨款`,
            placeholder: '请输入',
            // required: true,
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="fiscalAppropriation"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `initialAssetValue`,
            label: `资产原值`,
            component: 'InputNumber',
            placeholder: '请输入',
            required: true,
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
          },
          {
            field: `noFiscalAppropriation`,
            label: `非财政拨款`,
            placeholder: '请输入',
            // required: true,
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="noFiscalAppropriation"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `assetValue`,
            label: `均价/单价`,
            placeholder: '请输入',
            // required: true,
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="assetValue"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `entryState`,
            label: `财务入账状态`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            render: (text) => {
              return (
                <Select
                  options={[
                    {
                      label: '未入账',
                      value: 0,
                    },
                    {
                      label: '已入账',
                      value: 1,
                    },
                  ]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                />
              );
            },
          },
          {
            field: `entryDate`,
            label: `记账日期`,
            component: 'DatePicker',
            disabled: pageType === 'detail',
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            required: true,
          },
          {
            field: `entryCode`,
            label: `记账凭证号`,
            disabled: pageType === 'detail',
            component: 'Render',
            placeholder: '请输入',
            // required: true,
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="entryCode">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `depreciationState`,
            label: `折旧/摊销状态`,
            component: 'Render',
            disabled: true,
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={[]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `depreciationMethod`,
            label: `折旧/摊销方法`,
            // required: true,
            // disabled: true,
            component: 'Render',
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Select
                    options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.AVERAGE_LIFE_METHOD}`]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                );
              }
            },
          },
          {
            field: `depreciationYear`,
            label: `折旧/摊销年限`,
            placeholder: '请输入',
            disabled: true,
            min: 0,
            contentAfter: '月',
            required: true,
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="depreciationYear"
                    rules={[
                      {
                        pattern: RegularExpression?.number,
                        message: '请输入整数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `depreciationYear1`,
            label: `月折旧/摊销额`,
            component: 'InputNumber',
            placeholder: '请输入',
            disabled: true,
            min: 0,
            contentAfter: '元',
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
          },
          {
            field: `providedDepreciation`,
            label: `已提折旧/摊销月数`,
            component: 'InputNumber',
            placeholder: '请输入',
            disabled: true,
            min: 0,
            // contentAfter: 'm²',
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
          },
          {
            field: `scrapRate`,
            label: `残值率`,
            component: 'Render',
            placeholder: '请输入',
            disabled: true,
            min: 0,
            contentAfter: '%',
            pattern: RegularExpression?.twoFloatNumber,
            patternMsg: '请输入整数或保留两位小数',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    style={{ paddingLeft: 8 }}
                    name="scrapRate"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `depreciationMoney`,
            label: `已提折旧/摊销月数`,
            placeholder: '请输入',
            disabled: true,
            min: 0,
            // contentAfter: '元',
            // required: true,
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="depreciationMoney"
                    rules={[
                      {
                        pattern: RegularExpression?.number,
                        message: '请输入整数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `depreciationYear12`,
            label: `累计折旧/摊销`,
            placeholder: '请输入',
            disabled: true,
            min: 0,
            contentAfter: '元',
            pattern: RegularExpression?.number,
            patternMsg: '请输入整数',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="depreciationYear12"
                    rules={[
                      {
                        pattern: RegularExpression?.number,
                        message: '请输入整数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `depreciationYear123`,
            label: `净值`,
            placeholder: '请输入',
            disabled: true,
            min: 0,
            contentAfter: '元',
            pattern: RegularExpression?.twoFloatNumber,
            patternMsg: '请输入整数或保留两位小数',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="depreciationYear123"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `financialOfficer`,
            label: `财务负责人`,
            disabled: pageType === 'detail',
            component: 'Render',
            placeholder: '请输入',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="financialOfficer">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 使用信息 */
      {
        key: 'accept-use-info',
        title: '使用信息',
        fieldChildren: [
          {
            field: `assetState`,
            label: `资产状态`,
            component: 'Render',
            required: true,
            disabled: pageType === 'detail',
            render: (text) => {
              return (
                <Select
                  options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.MATERIEL_STATUS}`]}
                  disabled={true}
                  placeholder="请选择"
                  value={'100124031002'}
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                  onChange={() => {}}
                />
              );
            },
          },
          {
            field: `subjectToliability`,
            label: `使用责任主体`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `useBumen`,
            label: `使用部门`,
            component: 'Render',
            disabled: pageType === 'detail',
            // required: true,
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="useBumen">
                    <Select
                      loading={mapLoading}
                      options={[]}
                      disabled={pageType === 'detail'}
                      placeholder="请选择"
                      fieldNames={{
                        label: 'name',
                        value: 'id',
                      }}
                    />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `useBumen1`,
            label: `管理部门`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={[]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `useBumen12312`,
            label: `使用人`,
            component: 'Render',
            disabled: pageType === 'detail',
            // required: true,
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Select
                    loading={mapLoading}
                    options={[]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                );
              }
            },
          },
          {
            field: `useBumen123`,
            label: `管理人`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={[]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `forSharing`,
            label: `是否共享共用`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            render: (text) => {
              return (
                <Select
                  options={[
                    {
                      label: '是',
                      value: 1,
                    },
                    {
                      label: '否',
                      value: 0,
                    },
                  ]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                />
              );
            },
          },
          {
            field: `remark`,
            label: `备注`,
            colSpan: 1,
            maxLength: 200,
            disabled: pageType === 'detail',
            showCount: true,
            placeholder: '请输入',
            autoSize: { minRows: 2, maxRows: 4 },
            component: 'Render',
            slotRender: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="remark"
                    rules={[
                      {
                        message: '请输入',
                      },
                    ]}
                  >
                    <Input.TextArea allowClear showCount maxLength={200} placeholder="请输入" autoSize={{ minRows: 2, maxRows: 4 }} />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 特性信息 */
      {
        key: 'accept-special',
        title: '特性信息',
        fieldChildren: [
          {
            field: `ownershipNature`,
            label: `权属性质`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={[]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `ownershipType`,
            label: `产权形式`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请选择',
            render: (text) => {
              return (
                <Select
                  loading={mapLoading}
                  options={loadMapInfo?.[`${getTenantID()}${ILoadMapTypeAll.ASSET_EQUITY}`]}
                  disabled={pageType === 'detail'}
                  placeholder="请选择"
                  fieldNames={{
                    label: 'name',
                    value: 'id',
                  }}
                />
              );
            },
          },
          {
            field: `proofOwnership`,
            label: `权属证明`,
            disabled: pageType === 'detail',
            component: 'Render',
            placeholder: '请输入',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="proofOwnership">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `proofOwnershipCode`,
            label: `权属证号`,
            disabled: pageType === 'detail',
            component: 'Render',
            placeholder: '请输入',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="proofOwnershipCode">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `entryDate1`,
            label: `发证日期`,
            component: 'Render',
            disabled: pageType === 'detail',
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            required: false,
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{removeDateHmsStr(text) || '--'}</span>;
              } else {
                return (
                  <Form.Item name="entryDate1">
                    <DatePicker placeholder="请选择" format="YYYY-MM-DD" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `propertyOwner`,
            label: `权属人`,
            disabled: pageType === 'detail',
            component: 'Render',
            placeholder: '请输入',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="propertyOwner">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `completionSettlementDate`,
            label: `竣工决算日期`,
            component: 'Render',
            disabled: pageType === 'detail',
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{removeDateHmsStr(text) || '--'}</span>;
              } else {
                return (
                  <Form.Item name="completionSettlementDate">
                    <DatePicker placeholder="请选择" format="YYYY-MM-DD" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `buildingStructure`,
            label: `建筑结构`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `ownershipArea`,
            label: `权属面积`,
            component: 'InputNumber',
            placeholder: '请输入',
            required: true,
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            pattern: RegularExpression?.twoFloatNumber,
            patternMsg: '请输入整数或保留两位小数',
          },
          {
            field: `coverArea`,
            label: `占地面积`,
            component: 'InputNumber',
            placeholder: '请输入',
            required: true,
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            pattern: RegularExpression?.twoFloatNumber,
            patternMsg: '请输入整数或保留两位小数',
          },
          {
            field: `dilapidatedHouseArea`,
            label: `危房面积`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="dilapidatedHouseArea"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `warmOneselfArea`,
            label: `取暖面积`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="warmOneselfArea"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `position`,
            label: `坐落位置`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
          {
            field: `inUseprice`,
            label: `在用价值`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseprice"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseprice123123`,
            label: `出借价值`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseprice123123"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseprice112123121123123`,
            label: `出租价值`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseprice112123121123123"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseprice1121231211231232`,
            label: `闲置价值`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseprice1121231211231232"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseprice11212312112312323`,
            label: `待处置价值`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseprice11212312112312323"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 面积 */
      {
        key: 'accept-xiaoji5',
        title: '面积',
        fieldChildren: [
          {
            field: `inUseAreaWorkSpace111`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace111"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaWorkSpace2`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace2"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaOfficeSpace1`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaOfficeSpace1"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaBusinessSpace1`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaBusinessSpace1"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaOtherSpace1`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaOtherSpace1"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 在用面积 */
      {
        key: 'accept-inuse-area',
        title: '在用面积',
        fieldChildren: [
          {
            field: `inUseAreaWorkSpace1`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace1"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `inUseAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 本单位实际使用面积 */
      {
        key: 'accept-xiaoji1',
        title: '本单位实际使用面积',
        fieldChildren: [
          {
            field: `inUseAreaWorkSpace1111`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace1111"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `useAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="useAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `useAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="useAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `useAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="useAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `useAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="useAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 出租面积 */
      {
        key: 'accept-xiaoji2',
        title: '出租面积',
        fieldChildren: [
          {
            field: `czinUseAreaWorkSpace11111`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="czinUseAreaWorkSpace11111"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `czuseAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="czuseAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `czuseAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="czuseAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `czuseAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="czuseAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `czuseAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="czuseAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 出借面积 */
      {
        key: 'accept-xiaoji6',
        title: '出借面积',
        fieldChildren: [
          {
            field: `cjinUseAreaWorkSpace1111`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="cjinUseAreaWorkSpace1111"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `cjuseAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="cjuseAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `cjuseAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="cjuseAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `cjuseAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="cjuseAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `cjuseAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="cjuseAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 闲置面积 */
      {
        key: 'accept-xiaoji7',
        title: '闲置面积',
        fieldChildren: [
          {
            field: `inUseAreaWorkSpace111111`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="inUseAreaWorkSpace111111"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `unusedAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="unusedAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `unusedAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="unusedAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `unusedAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="unusedAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `unusedAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="unusedAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 待处置面积 */
      {
        key: 'accept-xiaoji8',
        title: '待处置面积',
        fieldChildren: [
          {
            field: `notDisposedAreaWorkSpace1`,
            label: `小计`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: '元',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="notDisposedAreaWorkSpace1"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `notDisposedAreaWorkSpace`,
            label: `办公用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="notDisposedAreaWorkSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `notDisposedAreaOfficeSpace`,
            label: `办公室用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="notDisposedAreaOfficeSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `notDisposedAreaBusinessSpace`,
            label: `业务用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 0,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="notDisposedAreaBusinessSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `notDisposedAreaOtherSpace`,
            label: `其他用房`,
            placeholder: '请输入',
            disabled: pageType === 'detail',
            min: 1,
            contentAfter: 'm²',
            component: 'Render',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item
                    name="notDisposedAreaOtherSpace"
                    rules={[
                      {
                        pattern: RegularExpression?.twoFloatNumber,
                        message: '请输入整数或保留两位小数',
                      },
                      { type: 'number', min: 0 },
                    ]}
                  >
                    <InputNumber placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 处置信息 */
      {
        key: 'accept-disponse',
        title: '处置信息',
        fieldChildren: [
          {
            field: `disponseType`,
            label: `处置形式`,
            component: 'Render',
            disabled: pageType === 'detail',
            placeholder: '请选择',
            render: (text) => {
              return (
                <Form.Item name="disponseType">
                  <Select
                    loading={mapLoading}
                    options={[]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `disponseType1`,
            label: `处置渠道`,
            component: 'Render',
            disabled: pageType === 'detail',
            placeholder: '请选择',
            render: (text) => {
              return (
                <Form.Item name="disponseType1">
                  <Select
                    loading={mapLoading}
                    options={[]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                    fieldNames={{
                      label: 'name',
                      value: 'id',
                    }}
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `disponseDate`,
            label: `处置时间`,
            component: 'Render',
            disabled: true,
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{removeDateHmsStr(text) || '--'}</span>;
              } else {
                return (
                  <Form.Item name="disponseDate">
                    <DatePicker placeholder="请选择" format="YYYY-MM-DD" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `disponseDate11`,
            label: `处置收益`,
            component: 'Render',
            disabled: true,
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{text ? text : '--'}</span>;
              } else {
                return (
                  <Form.Item name="disponseDate11">
                    <Input placeholder="请输入" />
                  </Form.Item>
                );
              }
            },
          },
        ],
      },
      /** 密级信息 */
      {
        key: 'accept-miji',
        title: '密级信息',
        fieldChildren: [
          {
            field: `denseState`,
            label: `定密状态`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            render: (text) => {
              return (
                <Form.Item name="denseState">
                  <Select
                    options={[
                      {
                        label: '未定密',
                        value: 0,
                      },
                      {
                        label: '已定密',
                        value: 1,
                      },
                    ]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `denseDate`,
            label: `定密时间`,
            component: 'DatePicker',
            disabled: pageType === 'detail',
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            required: true,
          },
          {
            field: `longTime`,
            label: `是否长期`,
            component: 'Render',
            disabled: pageType === 'detail',
            required: true,
            render: (text) => {
              return (
                <Form.Item name="longTime">
                  <Select
                    options={[
                      {
                        label: '长期',
                        value: 1,
                      },
                      {
                        label: '非长期',
                        value: 0,
                      },
                    ]}
                    disabled={pageType === 'detail'}
                    placeholder="请选择"
                  />
                </Form.Item>
              );
            },
          },
          {
            field: `denseDate123123`,
            label: `定密截止期限`,
            component: 'Render',
            disabled: true,
            format: 'YYYY-MM-DD',
            placeholder: '请选择',
            render: (text) => {
              if (pageType === 'detail') {
                return <span style={{ paddingLeft: 8 }}>{removeDateHmsStr(text) || '--'}</span>;
              } else {
                return (
                  <Form.Item name="denseDate123123">
                    <DatePicker placeholder="请选择" format="YYYY-MM-DD" />
                  </Form.Item>
                );
              }
            },
          },
          {
            field: `secrecyTerm`,
            label: `保密期限`,
            disabled: pageType === 'detail',
            component: 'Input',
            placeholder: '请输入',
            required: true,
          },
        ],
      },
      /** 资产照片及附件 */
      {
        key: 'accept-fujian',
        title: '资产照片及附件',
        fieldChildren: [
          {
            field: `assetImage`,
            label: `材料图片`,
            component: 'Input',
            disabled: pageType === 'detail',
            required: true,
            placeholder: '请上传',
            render: (text, record) => {
              const fileName = 'assetImage';
              return (
                <>
                  {pageType !== 'detail' ? (
                    <UploadFormCommon
                      form={assetHouseForm}
                      fileFormName={fileName}
                      spanCol={24}
                      inRowProportion={24}
                      name={'attachFile'}
                      required={true}
                      accept={'.img|.png'}
                      disabledUpload={pageType === 'detail'}
                      url={'/purchaseSourceController/uploadFile'}
                      downloadUrl={'/assetInfo/downloadFile'}
                      fileFormDelName={'delFile'}
                      uploadSuccessCallback={(attachPaths) => {
                        assetHouseForm?.setFieldsValue({
                          assetImage: attachPaths,
                        });
                      }}
                      defaultFiles={text}
                      maxFile={1}
                      hintTitle={'且只能上传 1 个！'}
                      fieldBusiPath={'assetFile'}
                      // isShowUploadBtn={true}
                      delFunc={(delFilePath) => {
                        assetHouseForm?.setFieldsValue({
                          assetImage: '',
                        });
                      }}
                    >
                      上传
                    </UploadFormCommon>
                  ) : (
                    <div
                      style={{
                        height: '100%',
                        display: 'flex',
                        alignItems: 'center',
                        marginLeft: '8px',
                      }}
                    >
                      {record?.[fileName]
                        ? splitFileUrl(record?.[fileName])?.map((e, i) => {
                            return (
                              <Tooltip title={e.attachName} key={new Date().getTime() * 25615265152 + e?.attachName}>
                                <a
                                  onClick={() => {
                                    message.success('下载中，请稍后...');
                                    downloadTemplate('/assetInfo/downloadFile', e?.attachName, e?.attachUrl, () => {});
                                  }}
                                >
                                  <MyIcon type="icon-file-text-fill" />
                                  &nbsp;
                                  {getFileNameNotType(e.attachName, 8)}
                                </a>
                              </Tooltip>
                            );
                          })
                        : '--'}
                    </div>
                  )}
                </>
              );
            },
          },
          {
            label: '说明文件',
            field: 'qualityUrl',
            placeholder: '请上传',
            component: 'Render',
            colSpan: 1,
            // required: true,
            render: (text, record) => {
              const fileName = 'qualityUrl';
              return (
                <>
                  {pageType !== 'detail' ? (
                    <UploadFormCommon
                      form={assetHouseForm}
                      fileFormName={fileName}
                      spanCol={24}
                      inRowProportion={24}
                      name={'attachFile'}
                      required={false}
                      disabledUpload={pageType === 'detail'}
                      // accept={'.doc|.docx'}
                      url={'/purchaseSourceController/uploadFile'}
                      downloadUrl={'/assetInfo/downloadFile'}
                      fileFormDelName={'delFile'}
                      uploadSuccessCallback={(attachPaths) => {
                        assetHouseForm?.setFieldsValue({
                          qualityUrl: attachPaths,
                        });
                      }}
                      defaultFiles={text}
                      maxFile={1}
                      hintTitle={'且只能上传 1 个！'}
                      fieldBusiPath={'assetFile'}
                      // isShowUploadBtn={true}
                      delFunc={(delFilePath) => {
                        assetHouseForm?.setFieldsValue({
                          qualityUrl: '',
                        });
                      }}
                    >
                      上传
                    </UploadFormCommon>
                  ) : (
                    <div
                      style={{
                        height: '100%',
                        display: 'flex',
                        alignItems: 'center',
                        marginLeft: '8px',
                      }}
                    >
                      {record?.[fileName]
                        ? splitFileUrl(record?.[fileName])?.map((e, i) => {
                            return (
                              <Tooltip title={e.attachName} key={new Date().getTime() * 25615265152 + e?.attachName}>
                                <a
                                  onClick={() => {
                                    message.success('下载中，请稍后...');
                                    downloadTemplate('/assetInfo/downloadFile', e?.attachName, e?.attachUrl, () => {});
                                  }}
                                >
                                  <MyIcon type="icon-file-text-fill" />
                                  &nbsp;
                                  {getFileNameNotType(e.attachName, 8)}
                                </a>
                              </Tooltip>
                            );
                          })
                        : '--'}
                    </div>
                  )}
                </>
              );
            },
          },
        ],
      },
    ],
  });

  return {
    houseConfig,
    houseMethods,
  };
};

export { getHouseUpdateConfig };
